From: Marco Trevisan (TreviƱo) Date: Mon, 20 Mar 2023 20:23:36 +0000 (+0100) Subject: st/icon-theme: Disconnect from settings signals on disposal X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~371^2^2~76 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=69e7b8e79ad71094283fb41ad018f6a8c43ade65;p=gnome-shell.git st/icon-theme: Disconnect from settings signals on disposal Icon themes can be created by extensions and thus are likely destroyed on extension unload, so we must disconnect from StSettings signals to avoid accessing to invalid memory. See: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/2012021 Part-of: --- diff --git a/src/st/st-icon-theme.c b/src/st/st-icon-theme.c index dc3f8cedc..d6f68afbb 100644 --- a/src/st/st-icon-theme.c +++ b/src/st/st-icon-theme.c @@ -478,8 +478,8 @@ st_icon_theme_init (StIconTheme *icon_theme) icon_theme->pixbuf_supports_svg = pixbuf_supports_svg (); settings = st_settings_get (); - g_signal_connect (settings, "notify::gtk-icon-theme", - G_CALLBACK (theme_changed), icon_theme); + g_signal_connect_object (settings, "notify::gtk-icon-theme", + G_CALLBACK (theme_changed), icon_theme, 0); update_current_theme (icon_theme); }